home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / mac / files / t_sys5 / 92052tar.gz / 920528.tar / slip.h < prev    next >
C/C++ Source or Header  |  1992-05-28  |  2KB  |  60 lines

  1. /* @(#) $Header: slip.h,v 1.9 92/05/28 13:50:32 deyke Exp $ */
  2.  
  3. #ifndef _SLIP_H
  4. #define _SLIP_H
  5.  
  6. #ifndef _GLOBAL_H
  7. #include "global.h"
  8. #endif
  9.  
  10. #ifndef _IFACE_H
  11. #include "iface.h"
  12. #endif
  13.  
  14. #ifndef _SLHC_H
  15. #include "slhc.h"
  16. #endif
  17.  
  18. #define SLIP_MAX 16             /* Maximum number of slip channels */
  19.  
  20. /* SLIP definitions */
  21. #define SLIP_ALLOC      512     /* Receiver allocation increment */
  22.  
  23. #define FR_END          0300    /* Frame End */
  24. #define FR_ESC          0333    /* Frame Escape */
  25. #define T_FR_END        0334    /* Transposed frame end */
  26. #define T_FR_ESC        0335    /* Transposed frame escape */
  27.  
  28. /* Slip protocol control structure */
  29. struct slip {
  30.     struct iface *iface;
  31.     char escaped;           /* Receiver State control flag */
  32. #define SLIP_FLAG       0x01            /* Last char was a frame escape */
  33. #define SLIP_VJCOMPR    0x02            /* TCP header compression enabled */
  34.     struct mbuf *rbp_head;  /* Head of mbuf chain being filled */
  35.     struct mbuf *rbp_tail;  /* Pointer to mbuf currently being written */
  36.     char *rcp;              /* Write pointer */
  37.     int16 rcnt;             /* Length of mbuf chain */
  38.     struct mbuf *tbp;       /* Transmit mbuf being sent */
  39.     int16 errors;           /* Receiver input errors */
  40.     int type;               /* Protocol of input */
  41.     int (*send) __ARGS((int,struct mbuf *));        /* send mbufs to device */
  42.     int (*get) __ARGS((int,char *,int));            /* fetch input chars from device */
  43.     struct slcompress *slcomp;      /* TCP header compression table */
  44. };
  45.  
  46. /* In slip.c: */
  47. extern struct slip Slip[];
  48.  
  49. void asy_rx __ARGS((struct iface *iface));
  50. void asytxdone __ARGS((int dev));
  51. int slip_free __ARGS((struct iface *ifp));
  52. int slip_init __ARGS((struct iface *ifp,int vj));
  53. int slip_raw __ARGS((struct iface *iface,struct mbuf *data));
  54. void slip_rx __ARGS((int xdev,void *p1,void *p2));
  55. int slip_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  56.     int del,int tput,int rel));
  57. void slip_status __ARGS((struct iface *iface));
  58.  
  59. #endif  /* _SLIP_H */
  60.